package com.wei.czz.common.vo.common.sms;

import com.wei.czz.common.dto.common.NameValue;
import com.wei.czz.common.jsr303.group.Save;
import com.wei.czz.common.jsr303.group.Update;
import com.wei.czz.common.tool.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-06-14 21:34:47
 * className: SmsTemplateVo
 * version: 1.0
 * description:
 */
@Getter
@Setter
public class SmsTemplateVo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = Update.class)
    private Long id;

    /**
     * 短信类型
     */
    @NotNull(message = "短信类型不能为空", groups = { Save.class, Update.class})
    private Integer type;

    /**
     * 短信渠道
     */
    @NotNull(message = "短信渠道不能为空", groups = { Save.class, Update.class})
    private Integer channel;

    /**
     * 编号
     */
    @NotBlank(message = "编号不能为空", groups = { Save.class, Update.class})
    private String code;

    /**
     * 内容
     */
    @NotBlank(message = "内容不能为空", groups = { Save.class, Update.class})
    private String content;

    /**
     * 模板预设字段
     */
    @NotNull(message = "模板预设字段不能为空", groups = { Save.class, Update.class})
    private List<String> paramSet;

    /**
     * 短信渠道参数映射
     */
    @NotNull(message = "短信渠道参数不能为空", groups = { Save.class, Update.class})
    private Map<String, NameValue<String>> channelParamMap;

    /**
     * 版本号
     */
    @NotNull(message = "版本号不能为空", groups = { Update.class})
    private Integer version;

}
